<template>
    <div>
        <el-form>
            <el-form-item label="商户名：">
                <span>{{info.signName}}</span>
            </el-form-item>
            <el-form-item label="邮箱：">
                <span>{{info.email}}</span>
            </el-form-item>
            <el-form-item label="手机号：">
                <span>{{info.linkPhone}}</span>
            </el-form-item>
            <el-form-item label="法人姓名：">
                <span>{{info.legalPerson}}</span>
            </el-form-item>
            <el-form-item label="法人身份证号：">
                <span>{{info.legalPersonID}}</span>
            </el-form-item>
            <el-form-item label="商户地址：">
                <span>{{info.address}}</span>
            </el-form-item>
            <el-form-item class="btns-center">
                <el-button :icon="btnIcon" :disabled="btnDsable" type="primary" @click="confirmSigning">{{btnDsable?'加载中...':'确认签约'}}</el-button>
            </el-form-item>
        </el-form>
    </div>
</template>
<script>
export default {
    props: {
        info: Object,
        id: Number
    },
    data() {
        return {
            btnIcon:'',
            btnDsable: false
        }
    },
    created() {
    },
    methods: {
        // 确认签约
        confirmSigning() {
            if (!this.btnDsable) {
                this.btnDsable=true;
                this.btnIcon='el-icon-loading';
                let _this = this;
                this.$axios({
                    url: '/admin/channel/other',
                    data: {
                        type: 1,
                        userID: _this.id,
                        genre: 2
                    },
                    success(res) {
                        if (res.data.code == 200) {
                            _this.$message({
                                message: res.data.msg,
                                type: 'success'
                            });
                        } else {
                            _this.$message.error(res.data.msg);
                        }
                        _this.btnDsable=false;
                        _this.btnIcon='';
                    }
                });
            }
        },
    }
}
</script>